import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../pages/Home.vue'
import Singdetail from '../pages/detail.vue'
import Classify from '../pages/classify.vue'
import Search from '../pages/search.vue'
import Login from '../pages/login.vue'
import Register from '../pages/register.vue'
import My from '../pages/my.vue'
import Myattention from '../pages/myattention.vue'
import Adress from '../pages/adress.vue'
import Addadress from '../pages/addadress.vue'
import Myorder from '../pages/myorder.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: 'Home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path:'/detail/:id',
    name:'detail',
    component:Singdetail
  },
  {
    path:'/classify/:nm',
    name:'classify',
    component:Classify
  },
  {
    path:'/search',
    name:'search',
    component:Search
  },
  {
    path:'/login',
    name:'login',
    component:Login
  },
  {
    path:'/register',
    name:'register',
    component:Register
  },
  {
    path:'/my',
    name:'my',
    component:My
  },
  {
    path:'/myattention',
    name:'myattention',
    component:Myattention
  },
  {
    path:'/adress',
    name:'adress',
    component:Adress
  },
  {
    path:'/add',
    name:'add',
    component:Addadress
  },
  {
    path:'/myorder',
    name:'myorder',
    component:Myorder
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
